<html>
<head><meta charset="utf-8"><title>rustdoc, quickly #79540 · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html">rustdoc, quickly #79540</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220815970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220815970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220815970">(Dec 23 2020 at 18:43)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> I'm finally taking a look at <a href="https://github.com/rust-lang/rust/pull/79540">https://github.com/rust-lang/rust/pull/79540</a> and I realize that we didn't really talk about the expected workflow. I think it might be helpful to layout what I'm expecting:</p>
<ul>
<li>we add a use-ci-for-bootstrap flag to config.toml to gate these things:</li>
<li>we replace the stage0 compiler with a downloaded copy, additionally downloading and unpacking the rustc-dev (IIRC) component to give us a complete sysroot, not just std (this is entirely a bootstrap.py change)</li>
<li>rustbuild switches off the separate stage0-sysroot argument, instead treating stage0 just like all other stages (i.e. that their sysroot is complete). The std and rustc steps are modified to do nothing in stage 0; the sysroot is already complete. The assembly step for the stage 1 sysroot will simply copy stage0 to stage1.</li>
<li>rustdoc can then be compiled with x.py build --stage 1 src/tools/rustdoc, which should place a freshly compiled rustdoc into stage1/bin/rustdoc (I believe this should not require modifications)</li>
</ul>
<p>I think this should be much simpler than the current patch, though I have not looked at it in too much detail.</p>



<a name="220816121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220816121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220816121">(Dec 23 2020 at 18:45)</a>:</h4>
<p>stage0-sysroot is normally used so that beta rustc will use master libstd?</p>



<a name="220816187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220816187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220816187">(Dec 23 2020 at 18:46)</a>:</h4>
<blockquote>
<p>The std and rustc steps are modified to do nothing in stage 0; the sysroot is already complete. The assembly step for the stage 1 sysroot will simply copy stage0 to stage1.</p>
</blockquote>
<p>that sounds a <em>lot</em> simpler, yeah. although I was having trouble getting the copying to work correctly - does it need a manifest or should I just <code>cp -r</code>?</p>



<a name="220816497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220816497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220816497">(Dec 23 2020 at 18:49)</a>:</h4>
<p>also, if stage0 is now nightly, does that mean we <em>shouldn't</em> set cfg(bootstrap)?</p>



<a name="220816532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220816532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220816532">(Dec 23 2020 at 18:49)</a>:</h4>
<p>oh well I guess it doesn't matter since master libstd is no longer built except with the stage 1 compiler</p>



<a name="220816653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220816653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220816653">(Dec 23 2020 at 18:50)</a>:</h4>
<p>manifests are not used at all by rustbuild, so no, you shouldn't need to think about that</p>



<a name="220816669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220816669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220816669">(Dec 23 2020 at 18:50)</a>:</h4>
<p>cfg bootstrap is automatically not set, iirc</p>



<a name="220816782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220816782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220816782">(Dec 23 2020 at 18:51)</a>:</h4>
<p>we should have a cp_r method somewhere iirc, so you can do something like cp_r(builder.sysroot(builder.compiler(0, <a href="http://builder.build.build">builder.build.build</a>)), builder.sysroot(1, <a href="http://builder.build.build">builder.build.build</a>))</p>



<a name="220817707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220817707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220817707">(Dec 23 2020 at 19:03)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/rustdoc.2C.20quickly/near/220816121">said</a>:</p>
<blockquote>
<p>stage0-sysroot is normally used so that beta rustc will use master libstd?</p>
</blockquote>
<p>correct - under the new model, there should be no reason for that to exist during build compilation. x.py check probably shouldn't change, though it won't make much difference I think. We'll want to be sure to check that --stage 0 for test and doc continues to work as expected without the use-ci-for-bootstrap option and probably just immediately panic if attempted it with the option set, since I don't know what the right behavior would be</p>



<a name="220986575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220986575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220986575">(Dec 27 2020 at 01:02)</a>:</h4>
<blockquote>
<p>probably just immediately panic if attempted it with the option set, since I don't know what the right behavior would be</p>
</blockquote>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> I'm imagining this as sort of a dynamic <code>[build] rustc = "xxx"</code></p>



<a name="220986581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220986581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220986581">(Dec 27 2020 at 01:02)</a>:</h4>
<p>so in that case the right behavior would be to treat --stage 1 and --stage 0 the same</p>



<a name="220986582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220986582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220986582">(Dec 27 2020 at 01:02)</a>:</h4>
<p>but that's pretty confusing so maybe not a good idea</p>



<a name="220986649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220986649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220986649">(Dec 27 2020 at 01:04)</a>:</h4>
<p>Yeah I would just panic it seems ... not great to try and feed things through or whatever</p>



<a name="220986661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220986661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220986661">(Dec 27 2020 at 01:05)</a>:</h4>
<p>I am still a while from having any working code <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> </p>
<div class="codehilite"><pre><span></span><code>$ git show
commit b4a945c2484f6c0ab447983cefea64393033e8a8 (HEAD -&gt; no-xpy)
Author: Joshua Nelson &lt;jyn514@gmail.com&gt;
Date:   Wed Dec 23 19:00:02 2020 -0500

    ahhhhhh haaaaaaaaaaaaaaaaaaaaands
</code></pre></div>



<a name="220986667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220986667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220986667">(Dec 27 2020 at 01:05)</a>:</h4>
<p>Plus we have ad-hoc things that are specially different in stage 0 vs 1 (e.g. rustdoc in particular is 0=bootstrap, not 0=compiler stage0 artifacts, which is different from stage 1 behavior)</p>



<a name="220989405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220989405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220989405">(Dec 27 2020 at 02:28)</a>:</h4>
<p>ok so I'm not quite sure how to ask this but I'll try. I want to use the same <code>stage0/</code> directory for <code>stage1/</code>, just cp_r like you suggested. I've tried the following things:</p>
<ol>
<li>In <code>impl Step for RustcLink</code>, use <code>cp_r(stage_out(), sysroot_libdir())</code>. This breaks because I no longer actually write anything to <code>stage0-rustc</code>, it's only in stage0.</li>
<li>
<p>In <code>impl Step for Rustc</code>, use <code>cp_r("stage0", "stage0-rustc")</code>. This breaks in <code>RustcLink</code> because there's nothing in <code>/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/</code> (stage0-rustc has the same layout as stage0, which has no x86 directory; I can use <code>lib/rustlib/x86</code> but the directory structure there still doesn't match a cargo layout).</p>
<ul>
<li>Even if I did get that working somehow, it would still break because I don't know what to put in the stamp file, and the builder only copies things in the stamp file.</li>
</ul>
</li>
</ol>
<p>I don't really know where to go from here ... I feel like this doesn't fit very well into the <code>ensure</code> framework :/</p>



<a name="220989473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220989473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220989473">(Dec 27 2020 at 02:31)</a>:</h4>
<p>oh wait hold on I think I should be touching Assemble, not RustcLink</p>



<a name="220989481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220989481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220989481">(Dec 27 2020 at 02:31)</a>:</h4>
<p>also I've somehow managed to break the sysroot for bootstrap each time it compiles itself so that's fun</p>
<div class="codehilite"><pre><span></span><code>$ RUST_BACKTRACE=1 xpy build
Updating only changed submodules
Submodules updated in 0.01 seconds
   Compiling bootstrap v0.0.0 (/home/joshua/rustc/src/bootstrap)
error[E0463]: can&#39;t find crate for `std`
</code></pre></div>



<a name="220989697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220989697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220989697">(Dec 27 2020 at 02:39)</a>:</h4>
<p>yay I got to building stage1 std <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span> <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>
<div class="codehilite"><pre><span></span><code>Building stage1 std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
   Compiling cc v1.0.60
   Compiling core v0.0.0 (/home/joshua/rustc/library/core)
   Compiling libc v0.2.79
   Compiling std v0.0.0 (/home/joshua/rustc/library/std)
error[E0463]: can&#39;t find crate for `std`
</code></pre></div>



<a name="220989750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220989750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220989750">(Dec 27 2020 at 02:41)</a>:</h4>
<p>I think this error is from build scripts?</p>



<a name="220989945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220989945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220989945">(Dec 27 2020 at 02:49)</a>:</h4>
<p>oh oops I forgot to install the rustc-dev component</p>



<a name="220990000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220990000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220990000">(Dec 27 2020 at 02:51)</a>:</h4>
<p>hmm actually I think this is the same reason bootstrap keeps breaking itself, <code>stage0/bin/rustc</code> also can't build anything</p>



<a name="220990046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220990046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220990046">(Dec 27 2020 at 02:53)</a>:</h4>
<blockquote>
<div class="codehilite"><pre><span></span><code>        let _ = fs::remove_dir_all(&amp;sysroot);
</code></pre></div>

</blockquote>
<p><span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span></p>



<a name="220990158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220990158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220990158">(Dec 27 2020 at 02:57)</a>:</h4>
<p>oh hmm commenting that out doesn't fix it</p>



<a name="220990208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220990208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220990208">(Dec 27 2020 at 02:58)</a>:</h4>
<p>it was in <code>builder.rs</code>:</p>
<div class="codehilite"><pre><span></span><code>removing sysroot /home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib
</code></pre></div>
<p><a href="https://github.com/rust-lang/rust/blob/0fbc0ce3ab75237c4f65022bdb1f8673811dc858/src/bootstrap/builder.rs#L633">https://github.com/rust-lang/rust/blob/0fbc0ce3ab75237c4f65022bdb1f8673811dc858/src/bootstrap/builder.rs#L633</a></p>



<a name="220990381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220990381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220990381">(Dec 27 2020 at 03:04)</a>:</h4>
<p>OMG</p>
<div class="codehilite"><pre><span></span><code>$ xpy test src/test/rustdoc-ui
   Compiling compiletest v0.0.0 (/home/joshua/rustc/src/tools/compiletest)
    Finished release [optimized + debuginfo] target(s) in 29.14s
Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
    Finished release [optimized + debuginfo] target(s) in 0.13s
Check compiletest suite=rustdoc-ui mode=ui (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)

running 85 tests
.....................................................................................
test result: ok. 85 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.20s
````
</code></pre></div>



<a name="220992307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220992307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220992307">(Dec 27 2020 at 04:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> I know it's late tonight, but this is ready to go when you have time :)</p>



<a name="220992370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220992370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220992370">(Dec 27 2020 at 04:16)</a>:</h4>
<p>Set it to waiting on review please, and don't forget to update description of the PR with current state and decisions made in implementation, things to pay close attention to :)</p>



<a name="220993784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/220993784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#220993784">(Dec 27 2020 at 04:59)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/rustdoc.2C.20quickly.20.2379540/near/220992370">said</a>:</p>
<blockquote>
<p>Set it to waiting on review please, and don't forget to update description of the PR with current state and decisions made in implementation, things to pay close attention to :)</p>
</blockquote>
<p>done, happy to answer questions if you have them :)</p>



<a name="223607516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/223607516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#223607516">(Jan 22 2021 at 06:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> this is working again :) and the diff is much smaller too</p>



<a name="224904416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/224904416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#224904416">(Feb 02 2021 at 17:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> <a href="https://github.com/rust-lang/rust/pull/79540">https://github.com/rust-lang/rust/pull/79540</a> is waiting on review again (sorry to keep bugging you, but it's <em>really</em> close to being done I think)</p>



<a name="224904664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/224904664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#224904664">(Feb 02 2021 at 17:20)</a>:</h4>
<p>and there are a bunch of improvements I want to make waiting on the MVP</p>



<a name="224904781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/224904781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#224904781">(Feb 02 2021 at 17:21)</a>:</h4>
<p>It is unfortunately a change to rustbuild of sufficient magnitude that I need a large-ish chunk of time to review it, so it's going to need to wait for me to have that time. Sorry. It's possible e.g. <span class="user-mention" data-user-id="116015">@Alex Crichton</span> might be able to review too, not sure.</p>



<a name="224904935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/224904935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#224904935">(Feb 02 2021 at 17:22)</a>:</h4>
<p>Ah unfortunately I don't have time right now</p>



<a name="224905075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/224905075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#224905075">(Feb 02 2021 at 17:23)</a>:</h4>
<p>ok, I understand</p>



<a name="225796313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/225796313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#225796313">(Feb 10 2021 at 05:33)</a>:</h4>
<p>I started working on "Download a separate beta compiler for stage0" (<a href="https://github.com/rust-lang/rust/issues/81930">https://github.com/rust-lang/rust/issues/81930</a>) and found that as usual bootstrap is always more complicated than I expect it to be. Don't have time to write up fully but I left some ramblings on discord (<a href="https://discord.com/channels/273534239310479360/273539705595756544/808931797840429057">https://discord.com/channels/273534239310479360/273539705595756544/808931797840429057</a>) and I have some WIP code that I think handles the python side of things at least (<a href="https://github.com/jyn514/rust/tree/separate-stage0-stage1">https://github.com/jyn514/rust/tree/separate-stage0-stage1</a>).</p>



<a name="228700812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228700812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228700812">(Mar 04 2021 at 01:32)</a>:</h4>
<p>Ok, I found the issue. To build rustdoc, libstd and rustc-dev have to be built with the same compiler that's compiling rustdoc. That means that using the downloaded artifacts but compiling rustdoc with beta doesn't work, because the artifacts were compiled by stage1, not by beta.</p>
<p>As an alternative, I could compile <em>rustdoc</em> with stage1, but compile bootstrap tools with stage0. <span class="user-mention" data-user-id="116122">@simulacrum</span> how crazy does that sound?</p>



<a name="228700894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228700894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228700894">(Mar 04 2021 at 01:33)</a>:</h4>
<p>why would we not do that? I'm confused</p>



<a name="228700900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228700900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228700900">(Mar 04 2021 at 01:33)</a>:</h4>
<p>that seems like.. how everything works?</p>



<a name="228700921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228700921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228700921">(Mar 04 2021 at 01:33)</a>:</h4>
<p>rustdoc is compiled with stage0 currently</p>



<a name="228700953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228700953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228700953">(Mar 04 2021 at 01:34)</a>:</h4>
<p>not... always?</p>



<a name="228700997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228700997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228700997">(Mar 04 2021 at 01:34)</a>:</h4>
<p>like we definitely build it with non-beta compilers</p>



<a name="228701018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228701018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228701018">(Mar 04 2021 at 01:34)</a>:</h4>
<p>sorry, I mean <code>stage1/rustdoc</code> is built with stage0</p>



<a name="228701031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228701031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228701031">(Mar 04 2021 at 01:34)</a>:</h4>
<p>I'm not worrying about stage2 for now, it should be easy in comparison</p>



<a name="228701092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228701092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228701092">(Mar 04 2021 at 01:35)</a>:</h4>
<p>oh hmm maybe that's a better alternative - <em>only</em> support stage2 rustdoc when download-rustc is set</p>



<a name="228701108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228701108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228701108">(Mar 04 2021 at 01:35)</a>:</h4>
<p>then I don't have to worry about ABI differences between beta and master</p>



<a name="228701213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228701213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228701213">(Mar 04 2021 at 01:36)</a>:</h4>
<p>well more like "are doing the support thing", but sure :)</p>



<a name="228701235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228701235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228701235">(Mar 04 2021 at 01:37)</a>:</h4>
<p>and the difference between stage1 rustdoc and stage2 isn't particularly meaningful anyway, the only time it matters if you modify the standard library and want to see how it affects rustdoc but not how it affects rustc, which seems weird anyway</p>



<a name="228701276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228701276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228701276">(Mar 04 2021 at 01:37)</a>:</h4>
<p>ok nice I'll try that :)</p>



<a name="228702164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228702164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228702164">(Mar 04 2021 at 01:47)</a>:</h4>
<p>haha I didn't actually need any changes, I just needed to pass <code>--stage 2</code> :) worked like a charm <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span> <a href="https://github.com/jyn514/rust/tree/force-stage2-download-rustdoc">https://github.com/jyn514/rust/tree/force-stage2-download-rustdoc</a></p>



<a name="228702248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228702248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228702248">(Mar 04 2021 at 01:48)</a>:</h4>
<p>will clean it up, I should have a PR by the end of the night :)</p>



<a name="228706890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustdoc%2C%20quickly%20%2379540/near/228706890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustdoc.2C.20quickly.20.2379540.html#228706890">(Mar 04 2021 at 02:43)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/82739">https://github.com/rust-lang/rust/pull/82739</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>